package com.shi.shiro.mapper;

import com.shi.shiro.domain.Permission;
import com.shi.shiro.domain.Role;
import com.shi.shiro.domain.User;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    User selectUserByUsername(@Param("username") String username);

    List<Role> selectRolesByUserId(@Param("userId") Long userId);

    List<Permission> selectPermissionsByRoleId(@Param("roleId") Long roleId);

    boolean insertUser(@Param("user") User user);
}
